package org.cbg.mouslisten;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;
import org.come.until.MessagrFlagUntil;

/**
 * 物品兑换
 */
public class GodsForGodMouslisten implements MouseListener {
    private Goodstable goosGoodstable;

    public GodsForGodMouslisten(Goodstable goosGoodstable) {
        this.goosGoodstable = goosGoodstable;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    /**
     * 鼠标进入
     * @param e
     */
    @Override
    public void mouseEntered(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
        if (this.goosGoodstable != null) {
            ZhuFrame.getZhuJpanel().creatgoodtext(this.goosGoodstable);

        }
    }

    /**
     * 鼠标离开
     * @param e
     */
    @Override
    public void mouseExited(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
        if (this.goosGoodstable != null) {
            ZhuFrame.getZhuJpanel().cleargoodtext();
        }
    }
}
